#!/usr/bin/env python
from matplotlib.pyplot import *

fin=open('instance80_24/data.dat')
todo=fin.read().strip().split('\n')
xs=[int(x.split()[0]) for x in todo if x]
exacto=[int(x.split()[0]) for x in todo if x]
constru=[int(x.split()[1]) for x in todo if x]
local=[int(x.split()[2]) for x in todo if x]
tabu=[int(x.split()[3]) for x in todo if x]
#title("Cantidad de operaciones de $matching$")
xlabel("exacto")
ylabel("cs")
#plot(xs,exacto,'k.',label="exacto")
plot(xs,[constru[i]/float(xs[i]) for i in xrange(len(xs))],'gx',label="constructiva")
plot(xs,[local[i]/float(xs[i]) for i in xrange(len(xs))],'b+',label="busqueda local")
plot(xs,[tabu[i]/float(xs[i]) for i in xrange(len(xs))],'r.',label="tabu")
#plot(xs,[x*5.5+60 for x in xs],label=r"$c \times x$")
legend(loc=0)
ylim(ymax=1.1)
#savefig('ej1_counts.png',dpi=640./8)
show()
